package com.pubinfo.passbook.common.model.constant;

public enum StaffStatusEnum {
  
  DEPARTURE("退休", 0),
  ON_THE_JOB("在职", 1),
  EARLY_RETIREMENT("内退", 2),
  RETIRE("离休", 3);
  
  StaffStatusEnum(String status, Integer code) {
    this.code = code;
    this.status = status;
  }
  public String status;
  public Integer code;
  
  public String getStatus() {
    return status;
  }
  
  public Integer getCode() {
    return code;
  }
  
  public static StaffStatusEnum getEnumByStatus(String status) {
    for (StaffStatusEnum e : StaffStatusEnum.values()) {
      if (e.getStatus().equals(status)) {
        return e;
      }
    }
    return null;
  }
}
